/*
 Navicat Premium Dump SQL

 Source Server         : localhost
 Source Server Type    : PostgreSQL
 Source Server Version : 170005 (170005)
 Source Host           : localhost:5432
 Source Catalog        : vben
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 170005 (170005)
 File Encoding         : 65001

 Date: 24/05/2025 22:42:13
*/


-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS "public"."roles";
CREATE TABLE "public"."roles" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "code" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "created_at" timestamp(6) NOT NULL,
  "created_by" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "disabled" bool NOT NULL,
  "modified_by" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "modify_at" timestamp(6) NOT NULL,
  "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "remarks" varchar(255) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "public"."roles" OWNER TO "postgres";

-- ----------------------------
-- Records of roles
-- ----------------------------
BEGIN;
INSERT INTO "public"."roles" ("id", "code", "created_at", "created_by", "disabled", "modified_by", "modify_at", "name", "remarks") VALUES (1, 'admin', '2025-05-24 22:38:24', 'admin', 'f', 'admin', '2025-05-24 22:38:48', '管理员', NULL);
INSERT INTO "public"."roles" ("id", "code", "created_at", "created_by", "disabled", "modified_by", "modify_at", "name", "remarks") VALUES (2, 'common', '2025-05-24 22:39:31', 'admin', 'f', 'admin', '2025-05-24 22:39:40', '公共角色', NULL);
COMMIT;

-- ----------------------------
-- Auto increment value for roles
-- ----------------------------
SELECT setval('"public"."roles_id_seq"', 2, true);

-- ----------------------------
-- Primary Key structure for table roles
-- ----------------------------
ALTER TABLE "public"."roles" ADD CONSTRAINT "roles_pkey" PRIMARY KEY ("id");
